<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      /*
      
      */
      const xhr = new XMLHttpRequest();
      console.log("初始对象xhr", xhr.readyState);

      xhr.open("GET", "http://localhost:3008/users");
      console.log("初始状态", xhr.readyState);
      // xhr.onreadystatechange = function () {
      //   console.log("readystatechange", xhr.readyState);
      // };
      xhr.onprogress = function () {
        console.log("响应主体", xhr.readyState);
      };
      xhr.onload = function () {
        console.log("请求完成", xhr.readyState);
      };

      xhr.send();
    </script>
  </body>
</html>
